1. Field of the Invention
The present invention relates to image processing apparatuses.
2. Description of the Related Art
Recently, two-dimensional matrix barcodes are widely used, such as QR code (trademark). Hereinafter, “two-dimensional matrix barcode” is simply described as “2D code.” A technique is proposed that if an error detection rate is equal to or greater than a predetermined value due to a broken part of a 2D code when the 2D code is read, then a new 2D code is generated on the basis of information obtained by decoding the 2D code, and the original partially-broken 2D code is replaced with the new 2D code.
Some 2D codes broken with a stain or a chip may not be detected, or even if detected, such broken code may not be decoded properly.
In the aforementioned technique, on the basis of the error detection rate, it is determined whether the 2D code is restored or not. However, even under the same error detection rate, different broken positions in the 2D code result in different possibilities that the 2D code will not be detected and different possibilities that the 2D code will not be decoded properly when the breakage is progressed thereafter.
Therefore, in the aforementioned technique, even if the error detection rate is less than the predetermined value, the 2D code may not be detected or decoded properly in a relatively short time after the 2D code is detected or decoded properly.